package com.puppet.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.puppet.pojo.Book;
import com.baomidou.mybatisplus.extension.service.IService;

/**
* @author Kai
* @description 针对表【t_book】的数据库操作Service
* @createDate 2025-07-25 10:57:18
*/
/**
 * 书籍的业务类
 */
public interface BookService extends IService<Book> {
    /**
     * 按销量的降序排序，并且分页
     */
    Page<Book> findTopSales(Integer pageNum, Integer pageSize);

    IPage<Book> findByType(int pageNum, int pageSize, int typeId);

    Book findById(Long id);
}
